#ifndef CRANE_EVB_KEYPAD_H
#define CRANE_EVB_KEYPAD_H

#ifdef __cplusplus
extern "C" {
#endif

#include "lv_drv_conf.h"

#if USE_CRANE_EVB_KEYPAD

#include <stdbool.h>
#include "lvgl/src/lv_hal/lv_hal_indev.h"
#include "crane_onkey.h"

#define KEY_HANDLE_OVER  1
#define KEY_HANDLE_CONT   0

#define KEY_UNDEFINED 0xFFFFFFFF

typedef uint32_t (*keypad_cb_t)(struct keypad_param *arg);

void keypad_crane_evb_init(keypad_cb_t cb);
bool keypad_crane_evb_read(lv_indev_drv_t *indev_drv, lv_indev_data_t *data);

#endif /* USE_CRANE_EVB_KEYPAD */

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /* CRANE_EVB_KEYPAD_H */
